#!/bin/bash

# This script is not working! Use pgen.bat instead.

SYNTAX_DIR=$1
START_SYMBOL=$2

if [ -e "editor" ]; then
        rm -rf "editor"
fi
mkdir editor
export tempFile="temp.txt"
cat trans/lang.main.esv >> $tempFile
echo start symbols : $START_SYMBOL >> $tempFile
mv $tempFile editor/lang.main.esv
if [ -e syntax ]; then
        rm -rf "syntax"
fi
cp -r -T $SYNTAX_DIR syntax
export ANT_OPTS="-Xss8m -Xmx1024m"
ant -lib jar-lib
